package _11_整理题目._整理基础._OOM异常;

public class _02_Stack_Over_Flow {

    private int length = 1;

    public void sayHello() {
        length++;
        sayHello();
    }

    public static void main(String[] args) throws Throwable {
        _02_Stack_Over_Flow oom = new _02_Stack_Over_Flow();
        try {
            oom.sayHello();
        } catch (Throwable e) {
            System.out.println("stack length: " + oom.length);
            throw e;
        }
    }
}
